/////////////////////////////////////////////////////////////////////////////
// Name:        wxmudtextctrl.h
// Purpose:     
// Author:      Stephen Whittle
// Modified by: 
// Created:     09/06/2009 08:55:53
// RCS-ID:      
// Copyright:   
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef _WXMUDTEXTCTRL_H_
#define _WXMUDTEXTCTRL_H_


/*!
 * Includes
 */

////@begin includes
////@end includes
#include <wx/textctrl.h>

/*!
 * Forward declarations
 */
#include "wxmudcommandline.h"
////@begin forward declarations
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_TEXTCTRL12 10090
////@end control identifiers


/*!
 * wxMudTextCtrl class declaration
 */

class wxMudTextCtrl: public wxTextCtrl
{    
    DECLARE_DYNAMIC_CLASS( wxMudTextCtrl )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    wxMudTextCtrl();
    wxMudTextCtrl(wxWindow* parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator);

    /// Creation
    bool Create(wxWindow* parent, wxWindowID id, const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator);

    /// Destructor
    ~wxMudTextCtrl();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin wxMudTextCtrl event handler declarations

////@end wxMudTextCtrl event handler declarations

////@begin wxMudTextCtrl member function declarations

////@end wxMudTextCtrl member function declarations

////@begin wxMudTextCtrl member variables
////@end wxMudTextCtrl member variables
wxArrayString filterList;
void AddFilter(wxString);
void RemoveFilter(wxString);
void ProcessText(wxString input);
wxString windowName;

wxMudCommandLine* commandLineLocal;
private:
void Colour(wxString input);
void parseAndSetColours(wxString codes);
int GetLinesPerPage(void);
void CheckForGaugeString(wxString checkme);

    /// wxEVT_CHAR event handler for ID_TEXTCTRL
    void OnChar( wxKeyEvent& event );
    void OnKey( wxKeyEvent& event );

};



//need a function to handle incoming text messages



#endif
    // _WXMUDTEXTCTRL_H_
